package vn.nt.healthcare.server.ws.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

@Entity(name="Schedule")
@Table(name="schedule")
public class Schedule implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Integer Id;
	@Column(name = "start_time")
	private Date startTime;
	@Column(name = "state_order")
	private String stateOrder;
	@Column(name = "coin")
	private int coinBonus;
	@Column(name="description")
	private String desc;
	
	@ManyToOne
	@JoinColumn(name = "subjectID")
	@NotFound(action = NotFoundAction.IGNORE)
	private Subjects subject;

	@ManyToOne
	@JoinColumn(name = "staffID")
	@NotFound(action = NotFoundAction.IGNORE)
	private Doctor doctor;
	
	@ManyToOne
	@JoinColumn(name  = "customerID")
	@NotFound(action = NotFoundAction.IGNORE)
	private Customer customer;
	
	/**
	 * @return the id
	 */
	public Integer getId() {
		return Id;
	}

	/**
	 * @param id the id to set
	 */
	public void setId(Integer id) {
		Id = id;
	}

	/**
	 * @return the startTime
	 */
	public Date getStartTime() {
		return startTime;
	}

	/**
	 * @param startTime the startTime to set
	 */
	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}

	/**
	 * @return the stateOrder
	 */
	public String getStateOrder() {
		return stateOrder;
	}

	/**
	 * @param stateOrder the stateOrder to set
	 */
	public void setStateOrder(String stateOrder) {
		this.stateOrder = stateOrder;
	}

	/**
	 * @return the coinBonus
	 */
	public int getCoinBonus() {
		return coinBonus;
	}

	/**
	 * @param coinBonus the coinBonus to set
	 */
	public void setCoinBonus(int coinBonus) {
		this.coinBonus = coinBonus;
	}

	/**
	 * @return the desc
	 */
	public String getDesc() {
		return desc;
	}

	/**
	 * @param desc the desc to set
	 */
	public void setDesc(String desc) {
		this.desc = desc;
	}

	/**
	 * @return the subject
	 */
	public Subjects getSubject() {
		return subject;
	}

	/**
	 * @param subject the subject to set
	 */
	public void setSubject(Subjects subject) {
		this.subject = subject;
	}

	/**
	 * @return the doctor
	 */
	public Doctor getDoctor() {
		return doctor;
	}

	/**
	 * @param doctor the doctor to set
	 */
	public void setDoctor(Doctor doctor) {
		this.doctor = doctor;
	}

	/**
	 * @return the customer
	 */
	public Customer getCustomer() {
		return customer;
	}

	/**
	 * @param customer the customer to set
	 */
	public void setCustomer(Customer customer) {
		this.customer = customer;
	}
		
}
